Skip to content

Rename torchao.float8.Float8Tensor to torchao.float8.Float8TrainingTensor #2479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: jerryzh168/stack/4
Choose a base branch
from

Conversation

jerryzh168
Copy link
Contributor

@jerryzh168 jerryzh168 commented Jul 2, 2025

Stacked PRs:


Rename torchao.float8.Float8Tensor to torchao.float8.Float8TrainingTensor

Summary:
att, since we are introducing a inference version Float8Tensor

Test Plan:
regression tests for float8 training: pytest test/float8

Reviewers:

Subscribers:

Tasks:

Tags:

Copy link

pytorch-bot bot commented Jul 2, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/2479

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 1 Cancelled Job, 1 Unrelated Failure

As of commit d487b79 with merge base e9644da (image):

NEW FAILURE - The following job has failed:

CANCELLED JOB - The following job was cancelled. Please retry:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@jerryzh168 jerryzh168 force-pushed the jerryzh168/stack/11 branch from aacfea0 to 5fe4319 Compare July 2, 2025 21:42
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 2, 2025
@jerryzh168 jerryzh168 changed the base branch from jerryzh168/stack/4 to main July 2, 2025 23:44
@jerryzh168 jerryzh168 added the topic: not user facing Use this tag if you don't want this PR to show up in release notes label Jul 2, 2025
@jerryzh168 jerryzh168 force-pushed the jerryzh168/stack/11 branch from 5fe4319 to f9ba189 Compare July 2, 2025 23:44
@jerryzh168 jerryzh168 changed the base branch from main to jerryzh168/stack/4 July 2, 2025 23:44
@jerryzh168 jerryzh168 changed the base branch from jerryzh168/stack/4 to main July 3, 2025 00:09
@jerryzh168 jerryzh168 force-pushed the jerryzh168/stack/11 branch from f9ba189 to 782b53f Compare July 3, 2025 00:09
@jerryzh168 jerryzh168 changed the base branch from main to jerryzh168/stack/4 July 3, 2025 00:09
@jerryzh168 jerryzh168 changed the base branch from jerryzh168/stack/4 to main July 3, 2025 02:18
@jerryzh168 jerryzh168 force-pushed the jerryzh168/stack/11 branch from 782b53f to ea9092a Compare July 3, 2025 02:18
@jerryzh168 jerryzh168 changed the base branch from main to jerryzh168/stack/4 July 3, 2025 02:18
@jerryzh168 jerryzh168 changed the base branch from jerryzh168/stack/4 to main July 3, 2025 02:23
@jerryzh168 jerryzh168 force-pushed the jerryzh168/stack/11 branch from ea9092a to 1b8c7cc Compare July 3, 2025 02:23
@jerryzh168 jerryzh168 changed the base branch from main to jerryzh168/stack/4 July 3, 2025 02:23
@jerryzh168 jerryzh168 changed the base branch from jerryzh168/stack/4 to main July 3, 2025 02:36
@jerryzh168 jerryzh168 force-pushed the jerryzh168/stack/11 branch from 1b8c7cc to 2a00cd7 Compare July 3, 2025 02:36
@jerryzh168 jerryzh168 changed the base branch from main to jerryzh168/stack/4 July 3, 2025 02:36
@jerryzh168 jerryzh168 changed the base branch from jerryzh168/stack/4 to main July 3, 2025 02:37
@jerryzh168 jerryzh168 changed the base branch from main to jerryzh168/stack/4 July 3, 2025 02:38
@jerryzh168 jerryzh168 changed the base branch from jerryzh168/stack/4 to main July 3, 2025 02:44
@jerryzh168
Copy link
Contributor Author

Also, there are some callsites for Float8Tensor in fbcode, so we should make sure this diff is landed in a way where we could fix them in the fbcode diff.

sg, in this case I can do a forward fix in diff train

@jerryzh168
Copy link
Contributor Author

./test/float8/test_everything.sh

Runs without errors.

for torchtitan I have tested:

CONFIG_FILE="./torchtitan/models/llama3/train_configs/llama3_8b.toml" ./run_train.sh --model.converters="float8" --float8.enable_fsdp_float8_all_gather --float8.precompute_float8_dynamic_scale_for_fsdp --float8.force_recompute_fp8_weight_in_bwd --training.compile

and

CONFIG_FILE="./torchtitan/models/llama3/train_configs/llama3_8b.toml" ./run_train.sh --model.converters="float8" --float8.recipe_name rowwise --training.compile

CONFIG_FILE="./torchtitan/models/llama3/train_configs/llama3_8b.toml" ./run_train.sh --model.converters="float8" --float8.recipe_name rowwise_with_gw_hp --training.compile

is this enough?

@jerryzh168 jerryzh168 changed the base branch from jerryzh168/stack/4 to main July 3, 2025 21:57
@jerryzh168 jerryzh168 force-pushed the jerryzh168/stack/11 branch from 4d04b4c to b39be5d Compare July 3, 2025 21:57
@jerryzh168 jerryzh168 changed the base branch from main to jerryzh168/stack/4 July 3, 2025 21:57
@jerryzh168 jerryzh168 changed the base branch from jerryzh168/stack/4 to main July 7, 2025 18:47
@jerryzh168 jerryzh168 force-pushed the jerryzh168/stack/11 branch from b39be5d to 6132740 Compare July 7, 2025 18:47
@jerryzh168 jerryzh168 changed the base branch from main to jerryzh168/stack/4 July 7, 2025 18:47
@jerryzh168 jerryzh168 changed the base branch from jerryzh168/stack/4 to main July 7, 2025 19:52
@jerryzh168 jerryzh168 force-pushed the jerryzh168/stack/11 branch from 6132740 to e00893c Compare July 7, 2025 19:52
@jerryzh168 jerryzh168 changed the base branch from main to jerryzh168/stack/4 July 7, 2025 19:52
@jerryzh168 jerryzh168 changed the base branch from jerryzh168/stack/4 to main July 7, 2025 19:57
@jerryzh168 jerryzh168 force-pushed the jerryzh168/stack/11 branch from e00893c to 20ad3fb Compare July 7, 2025 19:57
@jerryzh168 jerryzh168 changed the base branch from main to jerryzh168/stack/4 July 7, 2025 19:57
@jerryzh168 jerryzh168 changed the base branch from jerryzh168/stack/4 to main July 7, 2025 22:39
@jerryzh168 jerryzh168 changed the base branch from main to jerryzh168/stack/4 July 7, 2025 22:39
@jerryzh168 jerryzh168 changed the base branch from jerryzh168/stack/4 to main July 7, 2025 23:14
@jerryzh168 jerryzh168 changed the base branch from main to jerryzh168/stack/4 July 7, 2025 23:14
@jerryzh168 jerryzh168 changed the base branch from jerryzh168/stack/4 to main July 7, 2025 23:27
@jerryzh168 jerryzh168 changed the base branch from main to jerryzh168/stack/4 July 7, 2025 23:28
@jerryzh168 jerryzh168 changed the base branch from jerryzh168/stack/4 to main July 8, 2025 00:14
@jerryzh168 jerryzh168 changed the base branch from main to jerryzh168/stack/4 July 8, 2025 00:15
@jerryzh168 jerryzh168 changed the base branch from jerryzh168/stack/4 to main July 8, 2025 02:27
@jerryzh168 jerryzh168 force-pushed the jerryzh168/stack/11 branch from 20ad3fb to 9a4b4ef Compare July 8, 2025 02:27
@jerryzh168 jerryzh168 changed the base branch from main to jerryzh168/stack/4 July 8, 2025 02:27
Copy link
Contributor

@vkuzo vkuzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test plan looks good, thank you!

…nsor

Summary:
att, since we are introducing a inference version Float8Tensor

Test Plan:
regression tests for float8 training: pytest test/float8

Reviewers:

Subscribers:

Tasks:

Tags:

stack-info: PR: #2479, branch: jerryzh168/stack/11
@jerryzh168 jerryzh168 changed the base branch from jerryzh168/stack/4 to main July 8, 2025 22:22
@jerryzh168 jerryzh168 force-pushed the jerryzh168/stack/11 branch from 9a4b4ef to d487b79 Compare July 8, 2025 22:22
@jerryzh168 jerryzh168 changed the base branch from main to jerryzh168/stack/4 July 8, 2025 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: not user facing Use this tag if you don't want this PR to show up in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants